home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- '''Punctuation Verbosity settings.
- The Orca punctuation settings are broken up into 4 modes.
-
- These modes are None, Some, Most and All.
-
- They are defined by a group of radio buttons on the speech
- page of the configuration user interface.
-
- Each mode is defined below. The 4 bits of information listed here are:
-
- - The actual printed symbol.
-
- - How the symbol should be pronounced (in the chnames dictionary in
- chnames.py keyed by symbol).
-
- - The level at which the symbol should be spoken. Note that this
- denotes the level containing all lower levels.
-
- - Whether or not the spoken name for the symbol should replace the
- actual symbol or be inserted before the symbol.
- '''
- __id__ = '$Id: punctuation_settings.py 4411 2009-01-08 15:09:09Z wwalker $'
- __version__ = '$Revision: 4411 $'
- __date__ = '$Date: 2009-01-08 10:09:09 -0500 (Thu, 08 Jan 2009) $'
- __copyright__ = 'Copyright (c) 2005-2008 Sun Microsystems Inc.'
- __license__ = 'LGPL'
- import settings
- PUNCTUATION_REPLACE = 0
- PUNCTUATION_INSERT = 1
- LEVEL_ALL = settings.PUNCTUATION_STYLE_ALL
- LEVEL_MOST = settings.PUNCTUATION_STYLE_MOST
- LEVEL_SOME = settings.PUNCTUATION_STYLE_SOME
- LEVEL_NONE = settings.PUNCTUATION_STYLE_NONE
- middle_dot = u'·'
- bullet = u'•'
- triangular_bullet = u'‚Ä£'
- hyphen_bullet = u'‚ÅÉ'
- black_square = u'■'
- white_square = u'‚ñ°'
- white_bullet = u'‚ó¶'
- white_circle = u'‚óã'
- black_diamond = u'‚óÜ'
- black_circle = u'‚óè'
- check_mark = u'‚úì'
- heavy_check_mark = u'‚úî'
- x_shaped_bullet = u'‚úó'
- right_arrow = u'‚ûî'
- right_arrowhead = u'‚û¢'
- SO_black_square = u'ÓÄä'
- SO_black_diamond = u'ÓÄå'
- cent = u'¢'
- pound = u'£'
- yen = u'¥'
- section = u'§'
- copyright_sign = u'©'
- not_sign = u'¬'
- registered = u'®'
- degree = u'°'
- plus_minus = u'±'
- superscript2 = u'²'
- superscript3 = u'³'
- one_quarter = u'¼'
- one_half = u'¬Ω'
- three_quarters = u'¾'
- multiply = u'√ó'
- divide = u'√∑'
- en_dash = u'–'
- left_single_quote = u'‘'
- right_single_quote = u'’'
- single_low_quote = u'‚Äö'
- left_double_quote = u'“'
- right_double_quote = u'”'
- double_low_quote = u'„'
- dagger = u'†'
- double_dagger = u'‡'
- per_mille = u'‰'
- prime = u'′'
- double_prime = u'″'
- euro = u'€'
- trademark = u'‚Ñ¢'
- infinity = u'‚àû'
- almost_equal = u'≈'
- not_equal = u'≠'
- lt_or_equal = u'‚â§'
- gt_or_equal = u'‚â•'
- square_root = u'‚àö'
- cube_root = u'‚àõ'
- punctuation = { }
- punctuation['!'] = [
- LEVEL_ALL,
- PUNCTUATION_INSERT]
- punctuation["'"] = [
- LEVEL_ALL,
- PUNCTUATION_REPLACE]
- punctuation[','] = [
- LEVEL_ALL,
- PUNCTUATION_INSERT]
- punctuation['.'] = [
- LEVEL_ALL,
- PUNCTUATION_INSERT]
- punctuation['?'] = [
- LEVEL_ALL,
- PUNCTUATION_INSERT]
- punctuation[right_single_quote] = [
- LEVEL_ALL,
- PUNCTUATION_REPLACE]
- punctuation['"'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['('] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[')'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['-'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['_'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[':'] = [
- LEVEL_MOST,
- PUNCTUATION_INSERT]
- punctuation[';'] = [
- LEVEL_MOST,
- PUNCTUATION_INSERT]
- punctuation['<'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['>'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['['] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[']'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['\\'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['|'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['`'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['~'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['{'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['}'] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[left_single_quote] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[left_double_quote] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[right_double_quote] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[en_dash] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[double_low_quote] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation[single_low_quote] = [
- LEVEL_MOST,
- PUNCTUATION_REPLACE]
- punctuation['#'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['$'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['%'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['&'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['*'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['+'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['/'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['='] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['@'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation['^'] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[cent] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[pound] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[yen] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[euro] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[not_sign] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[copyright_sign] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[registered] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[trademark] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[degree] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[plus_minus] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[multiply] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[divide] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[infinity] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[almost_equal] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[not_equal] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[lt_or_equal] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[gt_or_equal] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[square_root] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[cube_root] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[dagger] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[double_dagger] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[section] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[prime] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[double_prime] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[per_mille] = [
- LEVEL_SOME,
- PUNCTUATION_REPLACE]
- punctuation[middle_dot] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[bullet] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[triangular_bullet] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[hyphen_bullet] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[black_square] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[white_square] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[white_bullet] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[white_circle] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[black_diamond] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[black_circle] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[check_mark] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[heavy_check_mark] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[x_shaped_bullet] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[right_arrow] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[right_arrowhead] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[SO_black_square] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[SO_black_diamond] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[one_quarter] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[one_half] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[three_quarters] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[superscript3] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
- punctuation[superscript2] = [
- LEVEL_NONE,
- PUNCTUATION_REPLACE]
-
- def getPunctuationInfo(character):
- '''Given a punctuation character, return the value
- [punctuation_style, punctuation_action] or None
-
- Arguments:
- - character: the punctuation character to get the information for
-
- Returns return the value [punctuation_style, punctuation_action]
- or None
- '''
- if not isinstance(character, unicode):
- character = character.decode('UTF-8')
-
-
- try:
- return punctuation[character]
- except:
- return None
-
-
-